package com.webapp.tguide.model;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class TouristPoint implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@XmlElement
	private Long idTouristPoint;
	
	@Persistent
	private String name;
	
	@Persistent
	private String address;
	
	@Persistent
	private String country;
	
	@Persistent
	private String locality;
	
	@Persistent
	private String admArea;
		
	@Persistent
	private Double lat;

	@Persistent
	private Double lng;
	
	@Persistent
	private String zipCode;	
	
	@Persistent
	private String description;
	
	@Persistent
	private String webSite;
	
	@Persistent
	private Date created;
	
	@Persistent
	private Date lastUpdate;
			
	//bidirectional mapping 1 x 1
	@Persistent	
	@XmlElement(name="Category")
	private Category categoryType;

	//mapping 1 x N
	//@Persistent 
	//private List<AudioInformation> audioInformations;		
	
				
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	public String getWebSite() {
		return webSite;
	}
	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}
	
	public String getZipCode() {
		return zipCode;
	}
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Category getCategory() {
		return categoryType;
	}
	public void setCategory(Category category) {
		this.categoryType = category;
	}

//	public List<AudioInformation> getAudioInformations() {
//		return audioInformations;
//	}
//	public void setAudioInformations(List<AudioInformation> audioInformations) {
//		this.audioInformations = audioInformations;
//	}

	public Long getIdTouristPoint() {
		return idTouristPoint;
	}

	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}
	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
	
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getLocality() {
		return locality;
	}

	public void setLocality(String locality) {
		this.locality = locality;
	}

	public String getAdmArea() {
		return admArea;
	}

	public void setAdmArea(String admArea) {
		this.admArea = admArea;
	}

	public Double getLat() {
		return lat;
	}
	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLng() {
		return lng;
	}
	public void setLng(Double lng) {
		this.lng = lng;
	}

	@Override
	public String toString() {
		return "TouristPoint = " + this.name; 
	}
}

